package com.kakarote.hrm.mapper;

import com.alibaba.fastjson.JSONObject;
import com.kakarote.core.servlet.BaseMapper;
import com.kakarote.hrm.entity.PO.HrmEmployeeData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 客户扩展字段数据表 Mapper 接口
 * </p>
 *
 * @author huangmingbo
 * @since 2020-05-12
 */
public interface HrmEmployeeDataMapper extends BaseMapper<HrmEmployeeData> {

    Integer verifyUnique(@Param("fieldId") Long fieldId, @Param("value") String value, @Param("employeeId") Long employeeId);

    public List<JSONObject> queryFiledListByEmployeeId(@Param("employeeId") Long employeeId);

    String getEmployeeFieldValue(@Param("employeeId") Long employeeId, @Param("type") String type);

    List<HrmEmployeeData> queryEmployeeDataList(List<Long> employeeIds);

    List<HrmEmployeeData> queryEmployeeFiledListByEmployeeId(@Param("employeeId") Long employeeId);

    void deleteEmployeeDataByEmployeeIdAndFieldNameList(@Param("employeeId") Long employeeId, @Param("fieldNameList") List<String> fieldNameList);
}
